package com.example.lottery.service;

import com.example.lottery.controller.param.DrawPrizeParam;
import com.example.lottery.controller.param.ShowWinningRecordsParam;
import com.example.lottery.dao.datobject.WinningRecordDO;
import com.example.lottery.service.dto.WinningRecordDTO;

import java.util.List;

public interface DrawPrizeService {
    /**
     * 异步抽奖结果
     * @param param
     */
    void drawPrize(DrawPrizeParam param);

    /**
     * 检验抽奖请求
     * @param param
     * @return
     */
    boolean checkDrawPrizeParam(DrawPrizeParam param);

    /**
     * 保存中奖者名单
     * 活动维度或者活动奖品维度
     * 活动维度需要把所有奖品给抽完才可以
     * @param param
     * @return
     */
    List<WinningRecordDO> saveWinnerRecords(DrawPrizeParam param);

    /**
     * 删除活动/奖品下的中奖记录
     *
     * @param activityId
     * @param prizeId
     */
    void deleteRecords(Long activityId, Long prizeId);

    List<WinningRecordDTO> getRecords(ShowWinningRecordsParam param);
}
